package com.carful.xigua.modules.common.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

@Data
public class BaseEntity<T> implements Serializable{

    private static final long serialVersionUID = -2200808472860222760L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @TableLogic
    private Boolean deleted;

    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    public Serializable pkVal() {
        return serialVersionUID;
    }
}
